package com.zy.cat.entity.dev.act.resp;


import java.util.Arrays;
import java.util.List;

import org.apache.commons.lang3.StringUtils;

import com.fasterxml.jackson.annotation.JsonIgnore;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("线上推广开发者免费抽信息实体类")
public class APPActDBInfoResp {
	
	@ApiModelProperty(value = "到下阶段剩余的秒数", example = "1")
	private long lasts;
	
	@ApiModelProperty(value = "剩余免费抽奖次数", example = "5")
	private int lcount;
	
	private List<Goods> list;


	@Data
	@AllArgsConstructor
	@NoArgsConstructor
	public static class Goods{
		@ApiModelProperty(value = "商品ID", example = "18986866666")
		private String sid = "";

		@ApiModelProperty(value = "商品标题", example = "商品标题")
		private String stitle = "";

		@ApiModelProperty(value = "商品价值", example = "商品价值")
		private String srmb = "";

		@JsonIgnore
		@ApiModelProperty(value = "商品主图", example = "505685856")
		private String sicon = "";
		
		@JsonIgnore
		@ApiModelProperty(value = "商品详情图", example = "505685856")
		private String simgs = "";
		
		@ApiModelProperty(value = "商品主图", example = "505685856")
		private List<String> icons ;
		
		@ApiModelProperty(value = "商品详情图", example = "505685856")
		private List<String> imgs ;
		
		@ApiModelProperty(value = "最多参与人数", example = "0")
		private long dcount;
		
		@ApiModelProperty(value = "个人券ID列表", example = "505685856")
		private String qids;
		
		@ApiModelProperty(value = "商品期数", example = "1")
		private int cindex;
		
		@ApiModelProperty(value = "商品状态（0.参与人数已满、1.进行中、2.参与次数已达上限）", example = "0")
		private int qstatus;
		
		@ApiModelProperty(value = "已参与人数", example = "0")
		private long ycount;
		
		public void setSicon(String sicon) {
			this.sicon = sicon;
			if(StringUtils.isNotBlank(sicon)) {
				this.icons= Arrays.asList(sicon.split(","));
			}
		}
		public void setSimgs(String simgs) {
			this.simgs = simgs;
			if(StringUtils.isNotBlank(simgs)) {
				this.imgs= Arrays.asList(simgs.split(","));
			}
		}
	}
	
 
 
}
